<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <svg-icon icon-class="dashboard" />
    <svg-icon icon-class="eye" />
    <div>首页 - 帅峰</div>
    <div class="a" />
    <div class="b" />
    <div class="c" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
// 注意 类似封装函数 可以传参
// css语法，就和我们写css值一样 所以我们的大小 颜色等不需要加引号
@mixin myBox($size, $color) {
  width: $size;
  height: $size;
  margin-bottom: 5px;
  background-color: $color;
}
.a {
  @include myBox(100px, pink);
}
.b {
  @include myBox(200px, yellow);
}
.c {
  @include myBox(300px, green);
}
</style>
